package title;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Scanner;
import java.util.SimpleTimeZone;

/**
 * 功能：
 * 作者：lc
 * 日期：2024/12/1 2:18
 */
public class MainP5707_01 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int s = scanner.nextInt();
        int v = scanner.nextInt();
        Calendar date = Calendar.getInstance();
        date.set(2024,12,5,8,0);
        date.add(Calendar.MINUTE,s%v==0?-(s/v+10):-(s/v+11));
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH:mm");
        System.out.println(simpleDateFormat.format(date.getTime()));

    }
}
